VS Code extension: Improve gutter, code lens, and tree view resource state indicators#15688
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15688Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15688" |
There was a problem hiding this comment.
Pull request overview
Updates the Aspire VS Code extension’s editor and tree view resource-state visuals to be more distinguishable and informative (especially around unhealthy/waiting/not-started and exit-code scenarios), and documents the new editor indicators in the walkthrough.
Changes:
- Replaces gutter dot decorations with distinct SVG icon shapes (plus a “completed” variant) and refines state classification (e.g., Waiting spins; NotStarted does not).
- Enhances code lens state labeling with Waiting/Not Started labels, exit code display, and health check count/tooltip details.
- Improves tree view icons/tooltips to better reflect unhealthy/exit-code states and show per-check health report details; updates walkthrough documentation.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| extension/walkthrough/runApp.md | Adds “Editor indicators” documentation and screenshot reference. |
| extension/src/views/AspireAppHostTreeProvider.ts | Updates tree icons for unhealthy/exit-code states and expands tooltip with health report details. |
| extension/src/views/AppHostDataRepository.ts | Extends ResourceJson with healthReports and exitCode fields. |
| extension/src/editor/AspireGutterDecorationProvider.ts | Replaces colored dot gutter icons with distinct SVG shapes and adds “completed” category. |
| extension/src/editor/AspireCodeLensProvider.ts | Adds Waiting/Not Started labels, exit-code aware stopped labels, and health report counts/details in code lens. |
| extension/src/loc/strings.ts | Adds localized strings for new code lens labels (waiting/not-started/exit-code variants). |
| extension/src/test/codeLens.test.ts | Updates and extends tests for new state labels and exit-code behavior. |
| extension/src/test/appHostTreeView.test.ts | Updates and extends tests for new tree icon behavior and spinner distinctions. |
7c0a86b to
f7faa2f
Compare
|
screenshot? |
delta wifi blocks uploading screenshots to github, for some reason |
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
…state indicators - NotStarted resources show grey idle icon instead of loading spinner - Waiting resources show 'Waiting' label distinct from 'Starting' - Unhealthy health status shows yellow/warning instead of red/error - Successfully completed resources show pale green gutter dot and green tree icon - Non-zero exit codes show as error in gutter and tree view - Exit codes displayed in code lens for stopped resources - Health check details shown in code lens (e.g. 'Unhealthy 1/3') and tree tooltip - Added healthReports and exitCode to ResourceJson TypeScript interface - Added walkthrough section explaining editor indicators Fixes microsoft#15667 Related to microsoft#15577
- Localize hardcoded 'Health:' and 'Exit Code:' strings in
buildResourceDescription via vscode.l10n.t() wrappers
- Make Stopping state consistent: show spinner/Starting label in code
lens (matches gutter hourglass and tree view spinner)
- Fix healthCheckDescription from no-op '{0}' to 'Status: {0}'
- Fix weak test assertion: assert 'Exit Code: 1' instead of just '1'
- Fix fragile raw-newline tooltip markdown to use explicit \n\n
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Check stateStyle Error before Unhealthy in getResourceIcon to match gutter classifyState ordering (error takes precedence over warning) - Use HealthStatus constants instead of hardcoded strings in tooltip - Sort health report entries by name for stable tooltip ordering Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…e exit code 0 - Add codeLensResourceStopping string so Stopping state shows 'Stopping' instead of 'Starting' - Default health check tree nodes to Collapsed (summary is visible in parent description) - Only show exit code in tree description and code lens when non-zero Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
24f3349 to
5160fe1
Compare
Description
Improves the VS Code extension's resource state indicators in the gutter, code lens, and tree view to provide clearer, more informative feedback about resource status.
Changes
Gutter & Code Lens
NotStartedresources no longer show a loading spinner — onlyWaitingresources spin (in aspire panel, limit loading state for not started resources to resources actually waiting #15667)Unhealthyhealth status now show yellow warning indicators instead of red errorStoppedstate (previously fell through to defaults) in gutter, code lens, and tree iconStoppingnow shows a spinner/starting indicator consistently across gutter (hourglass), tree view (spinner), and code lens (Starting label)Tree View Panel
Unhealthy→ warning icon,NotStarted→ record (no spinner), successful exit → green pass, non-zero exit → errorLocalization
vscode.l10n.t()instrings.tsWalkthrough
Fixes #15667
Fixes #15577
Checklist